import MusicInfo from "./MusicInfo";
import MusicItem, { MusicItem_Side, MusicItem_Type } from "./MusicItem";

export default class GameConfig {

    public static config: Array<MusicInfo> = [
        new MusicInfo(1, [

            // MusicItem.create(1, MusicItem_Type.PressNode, 0, MusicItem_Side.Up, 1,
            //     MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Up, 300,
            //         MusicItem.create(1, MusicItem_Type.Arrow, 0, MusicItem_Side.Right, 300),

            MusicItem.create(1, MusicItem_Type.PressNode, 0, MusicItem_Side.Up, 1,
                MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Up, 300,
                    MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Right, 300,
                        MusicItem.create(1, MusicItem_Type.Arrow, 1, MusicItem_Side.Up, 400))),

            // MusicItem.create(1, MusicItem_Type.PressNode, 0, MusicItem_Side.Up, 1,
            //     MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Up, 300,
            //         MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Right, 300,
            //             MusicItem.create(1, MusicItem_Type.Line, 1, MusicItem_Side.Up, 600,
            //                 MusicItem.create(1, MusicItem_Type.Arrow, 0, MusicItem_Side.Left, 300)))),



            // MusicItem.create(1, MusicItem_Type.PressNode, 0, MusicItem_Side.Up, 1, 
            //     MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Up, 300))



            // MusicItem.create(1, MusicItem_Type.Line, 0, MusicItem_Side.Up, 300, 
            //     MusicItem.create(1, MusicItem_Type.Arrow, 0, MusicItem_Side.Right, 300)),


            // MusicItem.create(30, MusicItem_Type.PressNode, 1),
            // MusicItem.create(30, MusicItem_Type.Line, 1, MusicItem_Side.Up, 300),



            // MusicItem.create(2, 1, MusicItem_Type.Line, 0, 500, MusicItem_Side.Up),
            // MusicItem.create(2, 1, MusicItem_Type.Arrow, 0, 300, MusicItem_Side.Right),
            // MusicItem.create(3, 30, MusicItem_Type.PressNode, 0),
            // MusicItem.create(4, 30, MusicItem_Type.Arrow, 0, 300, MusicItem_Side.Right),

            // MusicItem.create(5, 60, MusicItem_Type.PressNode, 2),
            // MusicItem.create(6, 60, MusicItem_Type.Arrow, 2, 300, MusicItem_Side.Left),
        ], 2),
    ]


    public static getMusicInfo(id: number) {
        for (let i = 0; i < this.config.length; i++) {
            let info: MusicInfo = this.config[i]
            if (info.id == id) {
                return info;
            }
        }
    }
}